package com.css.apps.base.log.model;

import java.util.Iterator;
import java.util.List;

import com.css.apps.base.dict.model.SDict;
import com.css.apps.base.dict.service.QueryDict;
import com.css.util.Md5Util;
import com.css.util.StringHelper;

public class LogDict {

	public static String getDictType(String table, String dictId) {
		List<String> listIds = StringHelper.strToList(dictId);
		Iterator<String> iterStr = listIds.iterator();
		String names = "";
		while (iterStr.hasNext()) {
			String dictIdStr = iterStr.next().trim();
			names += QueryDict.get(SDict.class, Md5Util.MD5Encode(table + dictIdStr)).getName() + ",";
		}
		if (names.length() > 0)
			names = names.substring(0, names.length() - 1);
		return names;
	}
}
